import { request } from '../../../request';

/** 修改事件 */

export function updateEvent(data: any) {
  return request({
    url: '/qms/agv/notice/eventnotice/update',
    method: 'put',
    data
  });
}

/** 删除事件 */
export function deleteEvent(id: any) {
  return request({
    url: `/qms/agv/notice/eventnotice/delete/${id}`,
    method: 'delete'
  });
}

/** 修改事件状态 */
export function updateEventStatus(data: any) {
  return request({
    url: `/qms/agv/notice/eventnotice/changeState`,
    method: 'put',
    data
  });
}

/** 新增事件 */
export function addEvent(data: any) {
  return request({
    url: '/qms/agv/notice/eventnotice/save',
    method: 'post',
    data
  });
}

/** 绑定人员 */
export function bindUser(data: any) {
  return request({
    url: '/qms/agv/notice/event/user/ration/save',
    method: 'post',
    data
  });
}

export function getUserSelectList() {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: {
      pageNum: 1,
      pageSize: 999999
    }
  });
}
